package com.dragon.concurrent.demo.readandwrite;

import java.util.concurrent.TimeUnit;

public class ReadAndWriteLockClient {

    public static void main(String[] args) throws InterruptedException {
        ShareData shareData = new ShareData(8);
        new ReadWorker(shareData).start();
        new ReadWorker(shareData).start();
        new ReadWorker(shareData).start();
        new ReadWorker(shareData).start();
        new ReadWorker(shareData).start();
        new WriteWorker(shareData, "dragon").start();
        new WriteWorker(shareData, "mars").start();
    }
}
